﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Display.VisitorCenterUI {
    import flash.display.*;
    import org.aswing.*;
    import Classes.*;
    import Display.aswingui.*;
    import VisitingCenter.*;

    public class FactsPanel extends JPanel {

        protected const GRID_WIDTH:int = 670;
        protected const IDEAL_HEIGHT:int = 330;

        public function FactsPanel(_arg1:LayoutManager=null){
            super(new SoftBoxLayout(SoftBoxLayout.Y_AXIS, 0, SoftBoxLayout.TOP));
            this.init();
        }
        protected function init():void{
            var _local5:JPanel;
            var _local6:JLabel;
            var _local7:JLabel;
            var _local8:Sprite;
            var _local1:DisplayObject = (new (VisitorCenterDialog.assetDict["inner_undertab"])() as DisplayObject);
            ASwingHelper.setBackground(this, _local1);
            StatsManagerVisitorCenter.generateData();
            var _local2:Array = [[ZLoc.t("Dialogs", "VisitorUI_facts_roads"), StatsManagerVisitorCenter.roads], [ZLoc.t("Dialogs", "VisitorUI_facts_area"), StatsManagerVisitorCenter.area], [ZLoc.t("Dialogs", "VisitorUI_facts_emptyfranchises"), StatsManagerVisitorCenter.empty_franchise], [ZLoc.t("Dialogs", "VisitorUI_facts_marketvalue"), StatsManagerVisitorCenter.marketValue], [ZLoc.t("Dialogs", "VisitorUI_facts_wilderness"), StatsManagerVisitorCenter.wilderness], [ZLoc.t("Dialogs", "VisitorUI_facts_businesses"), StatsManagerVisitorCenter.businesses], [ZLoc.t("Dialogs", "VisitorUI_facts_residences"), StatsManagerVisitorCenter.residences], [ZLoc.t("Dialogs", "VisitorUI_facts_municipals"), StatsManagerVisitorCenter.municipals], [ZLoc.t("Dialogs", "VisitorUI_facts_landmarks"), StatsManagerVisitorCenter.landmarks], [ZLoc.t("Dialogs", "VisitorUI_facts_farmplots"), StatsManagerVisitorCenter.farmPlots]];
            var _local3:int;
            while (_local3 < _local2.length) {
                _local5 = new JPanel(new BorderLayout());
                _local6 = ASwingHelper.makeLabel(_local2[_local3][0], EmbeddedArt.DEFAULT_FONT_NAME_BOLD, 14, EmbeddedArt.blueTextColor);
                _local7 = ASwingHelper.makeLabel(_local2[_local3][1], EmbeddedArt.TITLE_FONT, 18, EmbeddedArt.blueTextColor);
                ASwingHelper.setEasyBorder(_local6, 0, 5);
                ASwingHelper.setEasyBorder(_local7, 0, 0, 0, 5);
                _local5.append(_local6, BorderLayout.WEST);
                _local5.append(_local7, BorderLayout.EAST);
                if ((_local3 % 2) == 0){
                    _local8 = new Sprite();
                    _local8.graphics.beginFill(EmbeddedArt.lightBlueTextColor);
                    _local8.graphics.drawRect(0, 0, 535, 30);
                    _local8.graphics.endFill();
                    ASwingHelper.setBackground(_local5, _local8);
                };
                ASwingHelper.setEasyBorder(_local5, 0, 70, 0, 70);
                _local5.setPreferredWidth(this.GRID_WIDTH);
                this.append(_local5);
                _local3++;
            };
            ASwingHelper.prepare(this);
            var _local4:int = (this.IDEAL_HEIGHT - this.getHeight());
            this.insert(0, ASwingHelper.verticalStrut((_local4 / 2)));
            this.append(ASwingHelper.verticalStrut((_local4 / 2)));
        }

    }
}//package Display.VisitorCenterUI 
